const express = require('express');
const router = express.Router();
const expressJoi = require('@escook/express-joi')
const {contentListCheck, addContentListCheck,updateContentListCheck, deleteContentListCheck} = require('../utils/check')
const contentList = require('../controllers/contentList')

// 内容列表管理接口
router.get('/contentList', expressJoi(contentListCheck), contentList.contentList)

// 内容列表添加接口
router.post('/addContentList', expressJoi(addContentListCheck), contentList.addContentList)

// 内容修改接口
router.get('/updateContentList', expressJoi(updateContentListCheck), contentList.updateContentListById)

// 内容删除接口
router.get('/deleteContentList', expressJoi(deleteContentListCheck), contentList.deleteContentListById)

module.exports = router;